﻿@using Microsoft.Owin.Security
@model ICollection<AuthenticationDescription>

@if (Model.Count == 0)
{
    <div class="message-info">
        <p>
            There are no external authentication services configured. See <a href="http://go.microsoft.com/fwlink/?LinkId=313242">this article</a>
            for details on setting up this ASP.NET application to support logging in via external services.
        </p>
    </div>
}
else
{
    using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = ViewBag.ReturnUrl }))
    {
        @Html.AntiForgeryToken()
        <fieldset id="socialLoginList">
            <legend></legend>
            <p id="social-buttons-group">
                @foreach (AuthenticationDescription p in Model)
                {
                    <button type="submit"
                            class="btn btn-@p.AuthenticationType.ToLower() btn-@p.AuthenticationType.ToLower()-plus"
                            title="Log in using your @p.Caption account"
                            id="@p.AuthenticationType"
                            name="provider"
                            value="@p.AuthenticationType">
                        <i class="icon-@p.AuthenticationType.ToLower() icon-@p.AuthenticationType.ToLower()-plus">
                        </i> | @p.AuthenticationType
                    </button>
                }
            </p>
        </fieldset>
    }
}
